package J250405;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;
import java.util.Scanner;

public class IO3 {
    public static void main(String[] args) {
        try (InputStream inputStream = new FileInputStream("./testDir/dir1/dir2/renameTo.txt")) {
            Scanner scanner = new Scanner(inputStream);
            while (scanner.hasNextLine()) {
                String next = scanner.nextLine();
                System.out.println(next);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
